package ntd.util.frame.magic.api;
import com.tool.jedis.FactoryJedis;
import org.springframework.stereotype.Component;
import org.ssssssss.magicapi.core.annotation.MagicModule;
import org.ssssssss.script.annotation.Comment;
import redis.clients.jedis.Jedis;

@Component  //注入到Spring容器中
@MagicModule("comRedis")    // 模块名称
public class RedisFunctions {

    @Comment("redis 构建方法")
    public Jedis init(@Comment("host") String host, Integer port, String password) {
        return FactoryJedis.get(host, port, password);
    }
}
